package unamur.iodass.registration;

import java.util.ArrayList;

import org.apache.log4j.Logger;

import unamur.iodass.communication.messages.BookStore;

public class BookStoreHandler {

	private static final Logger logger = Logger.getLogger(BookStoreHandler.class);

	
	private static volatile BookStoreHandler instance;
	private ArrayList<BookStore> bookStores;
	
	
	public static BookStoreHandler getInstance() {
		if (instance == null) {
			synchronized (BookStoreHandler.class) {
				if (instance == null) {
					instance = new BookStoreHandler();
				}
			}
		}
		return instance;
	}
	
	private BookStoreHandler() {
		bookStores = new ArrayList<BookStore>();
	}
	
	
	public void addBookStore(BookStore bs) {
		bookStores.add(bs);
	}
	
	public ArrayList<BookStore> getBookStores() {
		return bookStores;
	}
}
